package com.niyue.sandbox.uclock.cmdclock;

import org.apache.log4j.Logger;

import com.niyue.sandbox.uclock.core.Clock;
import com.niyue.sandbox.uclock.core.Event;
import com.niyue.sandbox.uclock.core.SecondTickerEvent;

public class CmdClock implements Clock {
	private static Logger logger=Logger.getLogger(CmdClock.class);
	public String getName() {
		return "Command Clock";
	}

	public void update(Event event) {
		if (event instanceof SecondTickerEvent) {
			SecondTickerEvent tickerEvent = (SecondTickerEvent) event;
			System.out.println("Current Time: "+tickerEvent.getTickerTime());
		}			
	}

}
